home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / mc51bugs / q35807 < prev    next >
Text File  |  1988-10-20  |  1KB  |  56 lines

  1. Q35807 Internal Compiler Error in Code.c:1.46, Line 1113
  2. C Compiler
  3. 5.00 5.10 | 5.10
  4. MS-DOS    | OS/2
  5.  
  6. Summary:
  7.  
  8. When compiled with any options, the code below produces the following
  9. error under C Version 5.00:
  10.  
  11.      fatal error C1001: Internal Compiler Error
  12.      (compiler file '@(#)code.c:1.43', line 1117)
  13.      Contact Microsoft Technical Support
  14.  
  15. Under C Version 5.10, the following error is generated:
  16.  
  17.      fatal error C1001: Internal Compiler Error
  18.      (compiler file '@(#)code.c:1.46', line 1113)
  19.      Contact Microsoft Technical Support
  20.  
  21. Microsoft has confirmed this to be a problem in Versions 5.00 and
  22. 5.10. We are researching this problem and will post new information as
  23. it becomes available.
  24.  
  25. The workaround to this problem is to use an if statement instead of
  26. the conditional operator within the loop, as follows:
  27.  
  28. for(;;)
  29.     {
  30.     if( value == 1 )
  31.         printf( "value is 1\ n" );
  32.     else
  33.         d /= 2.0;
  34.     }
  35.  
  36. More Information:
  37.  
  38. The following code demonstrates the problem:
  39.  
  40. #include <stdio.h>
  41. void main(void);
  42. void main()
  43. {
  44. double d = 3.42;
  45. int value = 1;
  46.  
  47. for(;;) /* Occurs with any loop i.e. do..while, while, or switch */
  48.    {
  49.    (value == 1 ) ? printf( "value is 1\n" ) : ( d /= 2.0 ) ;
  50.    }
  51. }
  52.  
  53.  
  54. Keywords:  buglist5.00 buglist5.10
  55. Updated  88/10/21 03:46
  56.